﻿#region

using System.Xml.Serialization;
using DotNetMax.CodeGen.Model.Collection;

#endregion

namespace DotNetMax.CodeGen.Model.Entity
{
    /// <summary>
    /// Entidade que Define uma Solução
    /// </summary>
    public class Solution : BaseEntity
    {
        #region Constructor

        public Solution()
        {
        }

        public Solution(string filePath, string name)
            : base(filePath, name)
        {
        }

        public Solution(string filePath, string name, string guid)
            : base(filePath, name, guid)
        {
        }

        #endregion

        #region Fields

        private ProjectInSolutionCollection _ProjectsInCurrentSolution = new ProjectInSolutionCollection();
        private ProjectCollection _Projects = new ProjectCollection();

        #endregion

        #region Properties

        /// <summary>
        /// Contém a Coleção de Projetos em uma SOlução
        /// </summary>
        [XmlArray("ProjectsInSolution")]
        [XmlArrayItem("ProjectInSolution")]
        public ProjectInSolutionCollection ProjectsInCurrentSolution
        {
            get { return _ProjectsInCurrentSolution; }
            set { _ProjectsInCurrentSolution = value; }
        }

        /// <summary>
        /// Retorna os Projetos da Solução
        /// </summary>
        [XmlIgnore]
        public ProjectCollection Projects
        {
            get { return _Projects; }
            set { _Projects = value; }
        }

        #endregion
    }
}